package com.hy.study.utils;

import com.alibaba.fastjson.JSONObject;

public class FastjsonImpl implements JsonApi {
    public <T> T toObj(String str, Class<T> clz) {
        return JSONObject.parseObject(str, clz);
    }

    public <T> String toStr(T t) {
        return JSONObject.toJSONString(t);
    }
}